<?php
require 'conn.php';
if($_GET[r] !=""){
	switch ($_GET[r]) {
		case 0:
		$r = 1;
		mysql_query("update links set recommend = $r where id = $_GET[id]");
		$su = 1;
		break;
		case 1:
		$r = 0;
		mysql_query("update links set recommend = $r where id = $_GET[id]");
		$su = 1;
		break;	
	}
}
if($_GET[a] !=""){
	switch ($_GET[a]) {
		case 0:
		$a = 1;
		mysql_query("update links set audit = $a where id = $_GET[id]");
		$su = 1;
		break;
		case 1:
		$a = 0;
		mysql_query("update links set audit = $a where id = $_GET[id]");
		$su = 1;
		break;	
	}
}
header("Location: ../success.php?su=$su");

